<template>
	<view>
		<!-- 模态框 -->
		<view @tap="Modal" :class="{ mask: model }"></view>
		<!-- 弹窗主体 -->
		<view :style="{ height: barHidth + 'rpx' }" class="active" :class="{ add: model }">
			<view class="item">
				<!-- <image src="/static/post/weixin.png" mode=""></image> -->
				<view class="text">
					微信好友
				</view>
			</view>
			<view class="item">
				<!-- <image src="/static/post/pengyouquan.png" mode=""></image> -->
				<view class="text">
					朋友圈
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props: {
			//控制弹窗的隐藏显示
			model: {
				type: Boolean,
				default: false,
			},
			//弹窗 窗口高度
			barHidth: {
				type: Number,
				default: 400,
			},
			//点击模态框是否能关闭弹窗
			showYes: {
				type: Boolean,
				default: true,
			},
		},
		data() {
			return {}
		},
		methods: {

		},
	}
</script>

<style scoped>
	.mask {
		position: fixed;
		top: 0;
		left: 0;
		right: 0;
		bottom: 0;
		background-color: #000;
		animation: getInto 0.5s 1;
		opacity: 0.5;
		z-index: 999;
	}

	@keyframes getInto {
		0% {
			opacity: 0;
		}

		100% {
			opacity: 0.5;
		}
	}

	.active {
		position: fixed;
		bottom: 0;
		left: 0;
		z-index: 1000;
		width: 100%;
		height: 400rpx;
		border-top-left-radius: 40rpx;
		border-top-right-radius: 40rpx;
		overflow: hidden;
		transform: translateY(100%);
		transition: 0.4s;
		background: #fff;
		padding-bottom: env(safe-area-inset-bottom);
		display: flex;
		align-items: center;
		justify-content: center;
	}

	.add {
		transform: translateY(0);
	}

	.item {
		padding: 0 67rpx;
	}

	.item>image {
		width: 88rpx;
		height: 88rpx;
		margin: 0 auto;
		display: block;
	}

	.item>.text {
		font-size: 28rpx;
		color: #333333;
		margin-top: 20rpx;
	}
</style>